package com.fjsh.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.fjsh.entity.TbUser;
import com.fjsh.mapper.TbUserMapper;
import com.fjsh.service.TbUserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * 用户表 服务实现类
 */
@Slf4j
@Service
public class TbUserServiceImpl implements TbUserService {

    @Autowired
    private TbUserMapper tbUserMapper;

    @Override
    public TbUser getUserByUserName(String s) {
        QueryWrapper<TbUser> wrapper = new QueryWrapper<>();
        wrapper.eq("username",s);
        return tbUserMapper.selectOne(wrapper);
    }
}
